<<<<<<< HEAD
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import Mainlogin from "../views/Mainlogin.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/mainlogin",
  },
  {
    path: "/mainlogin",
    name: "Mainlogin",
    component: Mainlogin,
  },
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/AboutView.vue"),
  },

  {
    path: "/homeView",
    name: "HomeView",
    component: () => import("../views/HomeView.vue"),
    children: [
      {
        path: "/",
        redirect: "/fristweb",
      },
      {
        path: "/fristweb",
        name: "Fristweb",
        component: () => import("../views/Fristweb.vue"),
      },
      {
        path: "/zhandianzhanghao",
        name: "Zhandianzhanghao",
        component: () => import("../views/Mainzhandianzhanghao.vue"),
      },
      {
        path: "/zhandian",
        name: "Mainzhandian",
        component: () => import("../views/Mainzhandian.vue"),
      },
      {
        path: "/yonghu",
        name: "Yonghu",
        component: () => import("../views/Mainyonghu.vue"),
      },
      {
        path: "/shangpin",
        name: "Shangpin",
        component: () => import("../views/Mainshangpin.vue"),
      },
      {
        path: "/wuliao",
        name: "Wuliao",
        component: () => import("../views/Mainwuliao.vue"),
      },
      {
        path: "/xitong",
        name: "Xitong",
        component: () => import("../views/Mainxitong.vue"),
      },
      {
        path: "/shezhi",
        name: "Shezhi",
        component: () => import("../views/Mainshezhi.vue"),
      },
      {
        path: "/paisongdingdan",
        name: "Paisongdingdan",
        component: () => import("../views/Mainpaisongdingdan.vue"),
      },
      {
        path: "/peisongyuan",
        name: "Peisongyuan",
        component: () => import("../views/Mainpeisongyuan.vue"),
      },
      {
        path: "/yonghuxiangqin",
        name: "yonghuxiangqin",
        component: () => import("../views/Mainyonghuxiangqin.vue"),
      },
      {
        path: "/wuliaotongji",
        name: "Wuliaotongji",
        component: () => import("../views/Mainwuliaotongji.vue"),
      },
      {
        path: "/jueseguanli",
        name: "Jueseguanli",
        component: () => import("../views/Mainjueseguanli.vue"),
      },
      {
        path: "/paisongdingdanxiangqin",
        name: "Paisongdingdanxiangqin",
        component: () => import("../views/Mainpaisongdingdanxiangqin.vue"),
      },
    ],
  },
  {
    path: "/jichushezhi",
    name: "jichushezhi",
    component: () => import("../views/Mainjichushezhi.vue"),
  },
];

const router = new VueRouter({
  routes,
});
//路由前置守卫
// router.beforeEach((to, from, next) => {
//   if (to.path == "/mainlogin") return next();
//   const tokenstr = window.localStorage.getItem("token"); //保存token值
//   if (!tokenstr) return next("/mainlogin"); //验证是否携带token值
//   next();
// });
export default router;
=======
import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import Mainlogin from "../views/Mainlogin.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/mainlogin",
  },
  {
    path: "/mainlogin",
    name: "Mainlogin",
    component: Mainlogin,
  },
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/AboutView.vue"),
  },

  {
    path: "/homeView",
    name: "HomeView",
    component: () => import("../views/HomeView.vue"),
    children: [
      {
        path: "/",
        redirect: "/fristweb",
      },
      {
        path: "/fristweb",
        name: "Fristweb",
        component: () => import("../views/Fristweb.vue"),
      },
      {
        path: "/zhandianzhanghao",
        name: "Zhandianzhanghao",
        component: () => import("../views/Mainzhandianzhanghao.vue"),
      },
      {
        path: "/zhandian",
        name: "Mainzhandian",
        component: () => import("../views/Mainzhandian.vue"),
      },
      {
        path: "/yonghu",
        name: "Yonghu",
        component: () => import("../views/Mainyonghu.vue"),
      },
      {
        path: "/shangpin",
        name: "Shangpin",
        component: () => import("../views/Mainshangpin.vue"),
      },
      {
        path: "/wuliao",
        name: "Wuliao",
        component: () => import("../views/Mainwuliao.vue"),
      },
      {
        path: "/xitong",
        name: "Xitong",
        component: () => import("../views/Mainxitong.vue"),
      },
      {
        path: "/shezhi",
        name: "Shezhi",
        component: () => import("../views/Mainshezhi.vue"),
      },
      {
        path: "/paisongdingdan",
        name: "Paisongdingdan",
        component: () => import("../views/Mainpaisongdingdan.vue"),
      },
      {
        path: "/peisongyuan",
        name: "Peisongyuan",
        component: () => import("../views/Mainpeisongyuan.vue"),
      },
      {
        path: "/yonghuxiangqin",
        name: "yonghuxiangqin",
        component: () => import("../views/Mainyonghuxiangqin.vue"),
      },
      {
        path: "/wuliaotongji",
        name: "Wuliaotongji",
        component: () => import("../views/Mainwuliaotongji.vue"),
      },
      {
        path: "/jueseguanli",
        name: "Jueseguanli",
        component: () => import("../views/Mainjueseguanli.vue"),
      },
      {
        path: "/paisongdingdanxiangqin",
        name: "Paisongdingdanxiangqin",
        component: () => import("../views/Mainpaisongdingdanxiangqin.vue"),
      },
    ],
  },
  {
    path: "/jichushezhi",
    name: "jichushezhi",
    component: () => import("../views/Mainjichushezhi.vue"),
  },
];

const router = new VueRouter({
  routes,
});
//路由前置守卫
// router.beforeEach((to, from, next) => {
//   if (to.path == "/mainlogin") return next();
//   const tokenstr = window.localStorage.getItem("token"); //保存token值
//   if (!tokenstr) return next("/mainlogin"); //验证是否携带token值
//   next();
// });
export default router;
>>>>>>> ae27e4fe2d4f939d0b0ee2bfa506b9e3269c53cb
